Skip to content

RDKB-64347: Fixing coverity issues#1096

Open
bharathivelp wants to merge 1 commit intordkcentral:developfrom
bharathivelp:RDKB_LOW_ISSUES
Open

RDKB-64347: Fixing coverity issues#1096
bharathivelp wants to merge 1 commit intordkcentral:developfrom
bharathivelp:RDKB_LOW_ISSUES

Conversation

@bharathivelp
Copy link
Copy Markdown
Contributor

@bharathivelp bharathivelp commented Apr 27, 2026

Reason for change: Fixing Low priority coverity issues.
Test Procedure: Build should be successful and the regression test should also succeed.

Risks: Low
Priority: P1
Signed-off-by: [email protected]

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses Coverity-reported issues across WiFi monitoring, webconfig consumer logging, and the WiFi blaster active-measurement flow.

Changes:

  • Removes an ineffective/null check and simplifies disconnect cleanup logic in associated-client stats collection.
  • Adjusts STA connection status log formatting in the webconfig consumer.
  • Avoids holding the blaster mutex while collecting (potentially slow) system health stats by restructuring the resource-gathering condition.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
source/stats/wifi_stats_assoc_client.c Removes dead/null logic, tweaks disconnect removal condition, and adds a sta_map NULL guard before event building.
source/sampleapps/webconfig_consumer_apis.c Updates STA connect/disconnect printf formats.
source/apps/blaster/wifi_blaster.c Refactors resource collection into a resource_ok boolean and releases the mutex during resource collection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/sampleapps/webconfig_consumer_apis.c Outdated
Comment thread source/apps/blaster/wifi_blaster.c Outdated
Comment thread source/stats/wifi_stats_assoc_client.c Outdated
Comment thread source/sampleapps/webconfig_consumer_apis.c Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bharathivelp bharathivelp force-pushed the RDKB_LOW_ISSUES branch 2 times, most recently from a04e6b5 to 6bcb5ab Compare April 29, 2026 12:14
@navyasher navyasher requested a review from Copilot April 29, 2026 12:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/pktgen/pktgen.c
Comment thread source/sampleapps/webconfig_consumer_apis.c Outdated
Comment thread source/sampleapps/wifievents_consumer_sample.c Outdated
Comment thread source/sampleapps/wifievents_consumer_sample.c Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/sampleapps/wifievents_consumer_sample.c Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/sampleapps/webconfig_consumer_apis.c
Comment thread source/sampleapps/wifievents_consumer_sample.c
Comment thread source/sampleapps/wifievents_consumer_sample.c Outdated
@navyasher navyasher force-pushed the RDKB_LOW_ISSUES branch 3 times, most recently from d9fe651 to f54cf35 Compare April 30, 2026 10:57
@navyasher navyasher requested a review from Copilot April 30, 2026 12:31
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/sampleapps/wifievents_consumer_sample.c
Comment thread source/sampleapps/webconfig_consumer_apis.c
Comment thread source/core/wifi_ctrl_rbus_handlers.c Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/core/wifi_ctrl_rbus_handlers.c Outdated
Comment thread source/sampleapps/webconfig_consumer_apis.c Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/sampleapps/wifievents_consumer_sample.c
Comment thread source/sampleapps/webconfig_consumer_apis.c
Comment thread source/sampleapps/webconfig_consumer_apis.c
csifptr = fopen(CSI_FILE, "r");

/* Secure temp file */
mode_t old_umask = umask(0077);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mask should be only RW for the group and the user. (0066)

Comment thread source/sampleapps/wifievents_consumer_sample.c
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/core/wifi_ctrl_rbus_handlers.c Outdated
Comment thread source/core/wifi_ctrl_rbus_handlers.c Outdated
p_data->raw_data_len = bytes_size;

} else if (strcmp(extension, "Bssid") == 0) {
} else if (strncmp(name + nlen - strlen("Bssid"), "BSSID", strlen("Bssid")) == 0) {
Comment on lines 2472 to 2473
printf("%s:%d: Station disconnected with external AP:%d radio:%u\r\n",
__func__, __LINE__, conn_status, index - 1);
Comment thread source/sampleapps/webconfig_consumer_apis.c
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

printf("%s:%d Rbus event name=%s\n",__FUNCTION__, __LINE__, event->name);

sscanf(event->name, "Device.WiFi.STA.%d.InterfaceName", &index);
if (sscanf(event->name, "Device.WiFi.STA.%d.InterfaceName", &index) != 1) {
Comment thread source/core/wifi_ctrl_rbus_handlers.c Outdated
Comment on lines +2707 to +2720
if (sscanf(name, "Device.WiFi.STA.%u.", &index) != 1) {
wifi_util_error_print(WIFI_CTRL, "%s Failed to parse STA index from %s\n", __FUNCTION__, name);
return bus_error_invalid_input;
}

sscanf(name, "Device.WiFi.STA.%d.%s", &index, extension);
if (index > getNumberRadios()) {
wifi_util_error_print(WIFI_CTRL, "%s Invalid index %d\n", __FUNCTION__, index);
if (index == 0 || index > getNumberRadios()) {
wifi_util_error_print(WIFI_CTRL, "%s Invalid index %u\n", __FUNCTION__, index);
return bus_error_invalid_operation;
}

vap_map = &mgr->radio_config[(index - 1)].vaps.vap_map;
vap_index = get_sta_vap_index_for_radio(&mgr->hal_cap.wifi_prop, index - 1);

if (strcmp(extension, "Connection.Status") == 0) {
if (strncmp(name + nlen - strlen("Connection.Status"), "Connection.Status", strlen("Connection.Status")) == 0) {
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/core/wifi_ctrl_rbus_handlers.c Outdated
Comment thread source/core/wifi_ctrl_rbus_handlers.c Outdated
Comment thread source/core/wifi_ctrl_rbus_handlers.c Outdated
Comment on lines +2748 to +2749
/* ---- Connection.Status ---- */
if (strncmp(attr, "Connection.Status", strlen("Connection.Status")) == 0) {
@bharathivelp bharathivelp force-pushed the RDKB_LOW_ISSUES branch 2 times, most recently from 000804a to d2b21dd Compare May 5, 2026 12:10
@navyasher navyasher requested a review from Copilot May 5, 2026 12:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/core/wifi_ctrl_rbus_handlers.c Outdated
Comment thread source/sampleapps/webconfig_consumer_apis.c
Comment thread source/core/wifi_ctrl_rbus_handlers.c Outdated
sscanf(name, "Device.WiFi.STA.%d.%s", &index, extension);
if (index > getNumberRadios()) {
wifi_util_error_print(WIFI_CTRL, "%s Invalid index %d\n", __FUNCTION__, index);
/* WiFi */
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change not needed since low priority

Reason for change: Fixing Low priority Coverity issues.
Test Procedure: Build should be successful and the regression test should also succeed.

Risks: Low
Priority: P1
Signed-off-by: [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants